<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<body>
<h1>session 中用户 : ${sessionScope.get("user").name}</h1>
<table class="table table-striped table-hover table-bordered table-condensed">
    <thead>
    <tr>
        <th>当前用户名称</th>
        <th>当前对象索引</th>
        <th>此次迭代的索引</th>
        <th>已经迭代的数量</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="user" items="${userList}" varStatus="status">
        <tr>
            <td><c:out value="${user.name}"/></td>
            <td><c:out value="${status.current}"/></td>
            <td><c:out value="${status.index}"/></td>
            <td><c:out value="${status.count}"/></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>
